<include file="public@header"/>
<style type="text/css">
    .pic-list li {
        margin-bottom: 5px;
    }
</style>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
<!--        <li><a href="{:url('Banner/index')}">Banner列表</a></li>-->
        <li class="active"><a href="#">充值聊币规则</a></li>
    </ul>
    <if condition="count($rule) neq 0">
        <form action="{:url('TalkCoinSet/update')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
            <div class="row">
                <div class="col-md-9">
                    <input type="hidden" name="id" required value=""/>
                    <table class="table table-bordered">
                        <volist name="rule" id="vo">
                        <tr>
                            <input type="hidden" name="id[]" value="{$vo.id}">

                            <th width="150">金额<span class="form-required">*</span></th>
                            <td>
                                <input style="width: 30%" class="form-control" type="number" min="1" name="price[]" required  placeholder="请输入金额" value="{$vo.price}"/>
                            </td>

                            <th width="150">聊币<span class="form-required">*</span></th>
                            <td>
                                <input style="width: 30%" class="form-control" type="number" min="0" name="pay_name[]" required min="0" placeholder="请输入聊币" value="{$vo.pay_name}"/>
                            </td>
                        </tr>
                        </volist>

                    </table>
                </div>

            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                    <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                </div>
            </div>
        </form>
        <else />
        <form action="{:url('TalkCoinSet/save')}" method="post" class="form-horizontal js-ajax-form margin-top-20">
            <div class="row">
                <div class="col-md-9">
                    <table class="table table-bordered">
                        <for start="0" end="6">
                        <tr>
                            <th width="150">金额<span class="form-required">*</span></th>
                            <td>
                                <input style="width: 30%" class="form-control" type="number" min="1"  name="price[]" required  placeholder="请输入金额" value="0"/>
                            </td>

                            <th width="150">聊币<span class="form-required">*</span></th>
                            <td>
                                <input style="width: 30%" class="form-control" type="number" min="0"  name="pay_name[]" required min="0" placeholder="请输入聊币" value="0"/>
                            </td>
                        </tr>
                        </for>
                    </table>
                </div>

            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                    <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                </div>
            </div>
        </form>
    </if>

</div>
<script type="text/javascript" src="__STATIC__/js/admin.js"></script>
<script type="text/javascript">
</script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/js/ueditor/ueditor.all.min.js"></script>

</body>
</html>
